package com.jptomato.android.demo.provider;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class AppsSQLiteOpenHelper extends SQLiteOpenHelper {
	/**
	 * コンストラクタ
	 * 
	 * @param context
	 */
	public AppsSQLiteOpenHelper(Context context) {
		super(context, AppsDatabase.DATABASE_NAME, null, AppsDatabase.DATABASE_VERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		new AppsDatabase.CategoryTable().create(db);

	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		new AppsDatabase.CategoryTable().drop(db);
		onCreate(db);
	}
}
